<!--
* description: 整车销售---订单状态
* author:xlc
* createdDate: 2020-12-10
-->
<template>
  <div>
    <el-col v-show="curIsShow" :key="fullComponentKey" :span="24">
      <el-checkbox-group v-model="modelCode" @change="querybystatus">
        <div class="flex">
          <div v-for="(item,index) in orderstatus" :key="index">
            <el-checkbox-button
              :key="item.lookupValueCode"
              class="check-box"
              :label="item.lookupValueCode"
            >{{ item.lookupValueName }}</el-checkbox-button>
          </div>
        </div>
      </el-checkbox-group>
    </el-col>
  </div>
</template>
<script>
import { orgApis } from '@/api/vesalesapi.js'
import { checkboxMixins } from '@/components/mixins/checkboxMixins'
const orderstatus = [
  { lookupValueCode: '1', lookupValueName: '定金已支付' },
  { lookupValueCode: '2', lookupValueName: '退订申请' },
  { lookupValueCode: '3', lookupValueName: '退订审核通过' },
  { lookupValueCode: '4', lookupValueName: '车辆退订入库' },
  { lookupValueCode: '5', lookupValueName: '退订退款完成' },
  // { lookupValueCode: '6', lookupValueName: '订单已分配' },
  { lookupValueCode: '7', lookupValueName: '合同已签署' },
  { lookupValueCode: '8', lookupValueName: '订单已配车' },
  // { lookupValueCode: '9', lookupValueName: '已插单' },
  { lookupValueCode: '10', lookupValueName: '订单已发运' },
  { lookupValueCode: '11', lookupValueName: '车辆已发车' },
  { lookupValueCode: '12', lookupValueName: '车辆验收入库' },
  { lookupValueCode: '13', lookupValueName: '尾款已支付' },
  { lookupValueCode: '14', lookupValueName: '车辆销售出库' },
  { lookupValueCode: '15', lookupValueName: '订单开票申请' },
  { lookupValueCode: '16', lookupValueName: '开票审核通过' },
  { lookupValueCode: '17', lookupValueName: '订单已开票' },
  { lookupValueCode: '18', lookupValueName: '订单已交付' },
  { lookupValueCode: '19', lookupValueName: '销退申请' },
  { lookupValueCode: '20', lookupValueName: '销退审核通过' },
  { lookupValueCode: '21', lookupValueName: '车辆销退入库' },
  { lookupValueCode: '22', lookupValueName: '销退退款完成' }
]
export default {
  mixins: [checkboxMixins],
  data() {
    return {
      orderstatus: orderstatus,
      apiConfig: orgApis.orderInvoice
    }
  },
  methods: {
    querybystatus(val) {
      if (this.modelCode === null || this.modelCode === '') {
        this.modelCode = this.isMul === true ? [] : ''
      }
      this.sendCode()
    }
  }
}
</script>
<style lang='scss' scoped>
.flex{
  display: flex;
  // justify-content:space-between;
  flex-wrap:wrap;
  div{
    display: inline-block;
    width: 108px;
    margin:5px;
  }
}
 .check-box{
   border-radius:4px
 }
 /deep/.el-checkbox-button__original{
   width: 0;
 }
/deep/label{
  overflow: visible !important;
}
/deep/span{
  min-width:104px;
  border-radius: 4px !important;
}
</style>
